﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel.Syndication;

namespace RssReaderTemplate.Model.Mappers
{
    public abstract class PartialMapper : ItemMapper
    {
        public override RssItem MapItem(SyndicationItem item)
        {
            var author = MapAuthor(item);
            var title = MapTitle(item);
            var content = MapContent(item);
            var publishDate = MapPublishDate(item);
            return new RssItem(title, content, author, publishDate);
        }

        public abstract string MapTitle(SyndicationItem item);
        public abstract string MapContent(SyndicationItem item);
        public abstract string MapAuthor(SyndicationItem item);
        public abstract DateTime MapPublishDate(SyndicationItem item);
    }
}
